﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Crossroad.Utils.Extensions;

namespace Crossroad.Core.Models
{
    [Serializable]
    public class ResData
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int code { set; get; }

        /// <summary>
        /// 消息
        /// </summary>
        public string message { set; get; }

        /// <summary>
        /// 数据
        /// </summary>
        public object data { set; get; }

        /// <summary>
        /// 权限
        /// </summary>
        public List<string> permissions { set; get; }

        /// <summary>
        /// 服务器时间戳
        /// </summary>
        public int nowTimestamp
        {
            get { return DateTime.Now.ToTimeStamp();}
            set { }
        }

        /// <summary>
        /// 服务器事件字符串
        /// </summary>
        public string nowDateTime
        {
            get { return DateTime.Now.ToDateTimeStr(); }
            set { }
        }

    }
}
